package factory;

import entity.CD;
import entity.Gift;
import entity.Pack;
import entity.Pen;
/**
 * 生产Gift的工厂类
 * @author yy
 *
 */
public abstract class GiftFactory {
	public static Gift getGift(int giftId){
		Gift gift = null;
		switch(giftId){
		case 1:
			gift = new CD("大话西游", 32.50);
			break;
		case 2:
			gift = new Pen("英雄",20.5);
			break;
		case 3:
			gift = new Pack("LV",44.0);
			break;
		}
		return gift;
	}

}
